package com.hspedu.tankgame4;


import javax.swing.*;

/**
 * @author LiuJinTao
 * @className TankGame01
 * @date 2024/06/20 17:42
 * @description TODO
 */
public class TankGame04 extends JFrame {
    // 定义一个 MyPanel
    MyPanel mp = null;

    public static void main(String[] args) {
        new TankGame04();

    }

    public TankGame04() {
        mp = new MyPanel();
        Thread thread = new Thread(mp);
        thread.start();
        this.add(mp);
        this.addKeyListener(mp);
        this.setSize(1000, 750);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setVisible(true);
    }
}
